(function() {
    "use strict";
    var e = window.jQuery,
        t = window.qh360cp;
    t.pages = t.pages || {}, e(function() {
        e("#hidemoney").click(function(t) {
            var n = e(this).parent().find("i");
            return e(this).text() == "\u663e\u793a" ? (n.eq(0).hide(), n.eq(1).show(), e(this).text("\u9690\u85cf")) : (n.eq(1).hide(), n.eq(0).show(), e(this).text("\u663e\u793a")), !1
        }), e("#userMoneyInfo a").on("click", function(e) {
            e.preventDefault(), t.cookie.get("Q") ? t.lightbox.confirm({
                content_title: "\u786e\u5b9a\u8981\u91cd\u65b0\u767b\u5f55\u5417\uff1f",
                content: "\u60a8\u5df2\u7ecf\u767b\u5f55\u4e86\u4e00\u4e2a\u8d26\u53f7\uff0c\u662f\u5426\u8981\u91cd\u65b0\u767b\u5f55",
                confirm_a: '<a style="margin-left:15px;" href="#" class="lnk lightbox_cancel">\u53d6\u6d88</a>',
                confirm_callback: function() {
                    t.passport.login(function(e) {
                        window.location.reload()
                    })
                },
                cancel_callback: function() {
                    window.location.reload()
                }
            }) : t.passport.login(function(e) {
                window.location.reload()
            })
        })
    })
})();
(function() {
    "use strict";
    var e = window.jQuery,
        t = window.qh360cp,
        n = window._;
    window._FilterSaveRqtip = !1;
    var r = {
        options: {
            selectedIndex: 0,
            fullMode: !0,
            hasRq: !1,
            isMobile: !1
        },
        getGuid: function() {
            return this.guidIndex = this.guidIndex || 1, "_filterGuid_" + this.guidIndex++
        },
        needmoney: function(t) {
            e("#need_money").html(this.formatBigNum(t)), e("#money").html(t)
        },
        inputNum: function(t) {
            var n = e(t).attr("isint") == 1,
                r = n ? parseInt : parseFloat,
                i = n ? /\D|^00/ : /(\.\d{3,}|^00)$/,
                s = e(t).attr("maxV"),
                o = e(t).val(),
                u = r(o, 10) || "";
            t.oldPrev = isNaN(t.oldPrev) || t.oldPrev == 0 ? u : t.oldPrev;
            if (!(isNaN(o) || i.test(o) || o.length > 8)) return s && o * 1 > s && e(t).val(s), t.oldPrev = e(t).val(), !0;
            e(t).val(t.oldPrev)
        },
        compareValue: function(t, n) {
            e(t).change(function() {
                var t = e(this).val(),
                    r = e(n).val(),
                    i = !1,
                    s = !1;
                this.nodeName == "SELECT" && e(".oldie").length > 0 && (i = !0), t == undefined || t == null ? s = !0 : (t *= 1, r *= 1, t > r ? s = !0 : (e(this).removeClass("error"), e(n).removeClass("error"), i && (e(this).parent().hasClass("error") && e(this).unwrap(), e(n).parent().hasClass("error") && e(n).unwrap()))), s && (e(this).addClass("error"), i && !e(this).parent().hasClass("error") && e(this).wrap('<i class="error"></i>'))
            }), e(n).change(function() {
                var n = e(this).val(),
                    r = e(t).val(),
                    i = !1;
                this.nodeName == "SELECT" && e(".oldie").length > 0 && (i = !0);
                var s = !1;
                n == undefined || n == null ? s = !0 : (r *= 1, n *= 1, r > n ? s = !0 : (e(this).removeClass("error"), e(t).removeClass("error"), i && (e(this).parent().hasClass("error") && e(this).unwrap(), e(t).parent().hasClass("error") && e(t).unwrap()))), s && (e(this).addClass("error"), i && !e(this).parent().hasClass("error") && e(this).wrap('<i class="error"></i>'))
            })
        },
        mouseMove: function(t, n) {
            e(t).each(function() {
                var t = !1,
                    r, i, s, o, u, a = this;
                e(a).find(n).mousedown(function(n) {
                    n = n || window.event, t = !0, r = e(a).offset(), o = e(a).width() / 2, i = n.clientX - r.left, s = n.clientY - r.top
                }).find(".close").mousedown(function(e) {
                    e = e || window.event, e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0
                }), e("body").mousemove(function(n) {
                    n = n || window.event;
                    if (t) {
                        var r = n.clientX - i,
                            o = n.clientY - s;
                        e(a).css({
                            left: r,
                            top: o
                        })
                    }
                }).mouseup(function() {
                    t = !1
                })
            })
        },
        formatBigNum: function(e) {
            var n = e * 1;
            return e, e > 1e8 ? t.number.format(e / 1e8, 2, 465) + "\u4ebf" : e > 1e5 ? t.number.format(e / 1e4, 2, 465) + "\u4e07" : e
        },
        formatBigNums: function(t) {
            var n = this,
                r = t.split("~"),
                i = "",
                s = r.length;
            return e.each(r, function(e) {
                i += n.formatBigNum(this), e < s - 1 && (i += "~")
            }), i
        },
        escapedStringify: function(e, t) {
            var n = JSON.stringify(e);
            return t ? n : n.replace(/\//g, function(e) {
                return "\\/"
            }).replace(/[\u003c\u003e]/g, function(e) {
                return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4).toUpperCase()
            }).replace(/[\\u007f-\uffff]/g, function(e) {
                return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4)
            })
        }
    };
    t.QFilter = r
})();
(function() {
    "use strict";
    var e = window.jQuery,
        t = window.qh360cp,
        n = window._;
    t.pages.pen = {
        pie: function(e) {
            var n = Raphael(e.sel),
                r = n.set(),
                i = 0,
                s = 0,
                o, u, a, f;
            u = e.cx, a = e.cy, f = e.r;
            var l, c, h, p, d = Math.PI / 180;
            n.customAttributes.segment = function(e, t, n, r, i, s) {
                var o = i - r > 180,
                    r = r % 360 * Math.PI / 180;
                return i = i % 360 * Math.PI / 180, {
                    path: [
                        ["M", e, t],
                        ["l", n * Math.cos(r), n * Math.sin(r)],
                        ["A", n, n, 0, +o, 1, e + n * Math.cos(i), t + n * Math.sin(i)],
                        ["z"]
                    ],
                    fill: s
                }
            };
            var v = e.nodes.length;
            if (v == 1) {
                e.nodeIndex = 0, t.pages.pen.circle(e);
                return
            }
            for (var m = 0, v = e.nodes.length; m < v; m++) i += e.nodes[m].data * 1;
            o = n.circle(e.cx, e.cy, e.r * 1 + 1).attr({
                stroke: "#eee",
                "stroke-width": 10
            });
            for (m = 0; m < v; m++) {
                l = e.nodes[m], p = 360 / i * l.data * 1;
                if (!l.data * 1) continue;
                (function(e, t, i, s) {
                    var o = s.color;
                    r.push(n.path().attr({
                        segment: [u, a, f, i, i + t, o],
                        stroke: "#cdc7c7",
                        "stroke-width": 0
                    }).hover(function() {
                        this.attr({
                            segment: [u, a, f + 5, i, i + t, o],
                            stroke: "#cdc7c7",
                            "stroke-width": 0,
                            title: s.label
                        })
                    }, function() {
                        this.attr({
                            segment: [u, a, f, i, i + t, o],
                            "stroke-width": 0
                        })
                    }))
                })(m, p, s, l), s += p, m == 0 && n.text(u + f + 60, a - 90, "\u5956\u91d1\u8303\u56f4").attr({
                    "font-size": 13,
                    "text-anchor": "start",
                    fill: "#f00"
                }), n.rect(u + f + 30, a - 50 - 25 + 26 * m, 16, 16).attr({
                    fill: l.color,
                    stroke: "#fff",
                    "stroke-width": 0
                }), c = n.text(u + f + 60, a - 50 - 17 + 26 * m, l.label).attr({
                    "font-size": 13,
                    "text-anchor": "start",
                    fill: l.color
                }), h = c.getBBox(), n.text(h.x + h.width + 12, a - 50 - 17 + 26 * m, l.txt).attr({
                    "font-size": 13,
                    "text-anchor": "start"
                }), n.text(u, a - f - 20, e.title).attr({
                    "font-size": 13,
                    "text-anchor": "middle"
                })
            }
            s = 0;
            for (m = 0; m < v; m++) l = e.nodes[m], p = 360 / i * l.data * 1, (e.flag && l.data > 0 && l.ru >= 1.5 || v == 2) && n.text(u + f * .5 * Math.cos((s + p / 2) / 180 * Math.PI), a + f * .5 * Math.sin((s + p / 2) / 180 * Math.PI), l.txt).attr({
                "text-anchor": "middle",
                "font-size": "14",
                fill: "#fff"
            }), s += p
        },
        circle: function(e) {
            var t = Raphael(e.sel),
                n, r = t.circle(e.cx, e.cy, e.r).attr("fill", e.nodes[e.nodeIndex].color),
                i = t.circle(e.cx, e.cy, e.r * 1 + 1).attr({
                    stroke: "#eee",
                    "stroke-width": 10
                }),
                s = 0,
                o = 0,
                u = 0,
                a = e.cx,
                f = e.cy,
                l = e.r;
            t.text(a, f, e.nodes[e.nodeIndex].txt).attr({
                "text-anchor": "middle",
                "font-size": "14",
                fill: "#fff"
            }), s += o, t.text(a + l + 60, f - 20, "\u5956\u91d1\u8303\u56f4").attr({
                "font-size": 13,
                "text-anchor": "start",
                fill: "#f00"
            }), t.rect(a + l + 30, f - 5, 16, 16).attr({
                fill: e.nodes[e.nodeIndex].color,
                stroke: "#118126",
                "stroke-width": 0
            }), n = t.text(a + l + 60, f + 2, e.nodes[e.nodeIndex].label).attr({
                "font-size": 13,
                "text-anchor": "start",
                fill: e.nodes[e.nodeIndex].color
            });
            var c = n.getBBox();
            t.text(c.x + c.width + 16, f + 2, e.nodes[e.nodeIndex].txt).attr({
                "font-size": 13,
                "text-anchor": "start"
            }), e.nodes[e.nodeIndex].title && t.text(a, f - l - 20, e.nodes[e.nodeIndex].title).attr({
                "font-size": 13,
                "text-anchor": "middle"
            })
        }
    }
})();